<table align="center" class="bTable" border="0" cellspacing="0">
    <tr align="center" bgcolor="#E4E3E4">
		<td><?=translate('ticket_num')?></td>
		<td><?=translate('subject')?></td>
		<td><?=translate('status')?></td>
		<td><?=translate('avg_time')?></td>
		<td><?=translate('open_date')?></td>
        <td><?=translate('details')?></td>
    </tr>
<? if($ticketsArr){ ?>
	<? for($i = 0; $i < count($ticketsArr); $i++){ ?>
					<?
	   					unset($params);
                        $params[sid] = $sid;
                        $params[action] = 'tickets';
						if($option == 'client_support')
							$params[option] = 'open_my_clients_ticket';
                        else
							$params[option] = 'open_my_ticket';
                        $params[tid] = $ticketsArr[$i]['id'];
                        $url = "$baseURL/$webDIR/?".encode_params($params);
                    ?>
	<tr>
		<td align='center'><a href="<?=$url?>"><?=$ticketsArr[$i]['id']?></a></td>
		<td align='left'><a href="<?=$url?>" onMouseOut="on_eo(event,'fullsubject<?=$ticketsArr[$i]['id']?>','hide')" onMouseOver="on_eo(event,'fullsubject<?=$ticketsArr[$i]['id']?>','show')"><?=substr(trim(stripslashes($ticketsArr[$i]['short_dsc'])), 0, 13)."..."?></a>
		<div style="display: none; position: absolute; width: 300px; padding: 5px; background-color:#FFFFFF;" class="bTable" id="fullsubject<?=$ticketsArr[$i]['id']?>"><?=trim(stripslashes($ticketsArr[$i]['short_dsc']))?></div>
		</td>
		<td align="center"><? if($ticketsArr[$i]['answered']) print translate('recieved'); else print translate('need'); ?></td>
		<td align="center"><? if(!$avg_times[$ticketsArr[$i]['id']]) print "00 00:00:00"; else print $avg_times[$ticketsArr[$i]['id']]; ?></td>
		<td align="center"><? print get_mysql_date('Y-m-d H:i:s', $ticketsArr[$i]['open_date'])?></td>
		<td align="center"><a href="<?=$url?>"><?=translate('more_info')?></a></td>
	</tr>
	<? } ?>
<? }else{ ?>
  <tr>
  	<td colspan="6" align="center"><?=translate('no_tickets')?></td>
  </tr>
<? } ?>
</table>
